﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

using SIMA.Entities;
using SIMA.Core.Enums;
using SIMA.Core.EventArgs;
using SIMA.Core.Security;

namespace SIMA.Interfaces
{
    [ServiceContract(CallbackContract = typeof(IUsuarioCallback), SessionMode = SessionMode.Required)]
    public interface IEstado
    {
        [OperationContract]
        void InsertEstado(T_C_Estado estado);

        [OperationContract]
        void UpdateEstado(T_C_Estado estadoToUpdate, T_C_Estado estadoUpdated);

        [OperationContract]
        void DeleteEstado(T_C_Estado estado);

        [OperationContract]
        void SelectSpecilized(string query, CommandType queryType, Profile perfil);

        [OperationContract]
        bool Subscribe();

        [OperationContract]
        bool Unsubscribe();

    }

    [ServiceContract]
    public interface IEstadoCallback
    {
        [OperationContract(IsOneWay = true)]
        void OnInserted(InsertedEventArgs args);

        [OperationContract(IsOneWay = true)]
        void OnUpdated(UpdatedEventArgs args);

        [OperationContract(IsOneWay = true)]
        void OnDeleted(DeletedEventArgs args);

        [OperationContract(IsOneWay = true)]
        void OnSelected(List<T_C_Estado> result);

        [OperationContract(IsOneWay = true)]
        void OnError(FailedEventArgs exceptionArgs);
    }
}
